Skip to content

fix: use turbo build in e2e CI job to resolve missing package artifacts#438

Merged
hotlong merged 2 commits intomainfrom
copilot/fix-ci-e2e-test
Feb 11, 2026
Merged

fix: use turbo build in e2e CI job to resolve missing package artifacts#438
hotlong merged 2 commits intomainfrom
copilot/fix-ci-e2e-test

Conversation

Copy link
Copy Markdown
Contributor

Copilot AI commented Feb 11, 2026

The e2e CI job fails with Exit code: 2 from the Playwright webServer because tsc can't resolve types from workspace packages whose dist/ directories don't exist. The build job runs on a separate VM and needs: build only gates execution order — it doesn't share artifacts.

  • playwright.config.ts: Use turbo run build --filter=@object-ui/console instead of pnpm --filter @object-ui/console build so turbo's ^build dependency chain builds all workspace packages before the console
  • .github/workflows/ci.yml: Add explicit build step before Playwright so the webServer's turbo build is a cache hit (~320ms)
# ci.yml - e2e job
- name: Build packages and console
  run: pnpm turbo run build --filter='./packages/*' --filter='./apps/console'
// playwright.config.ts
webServer: {
  command: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',
}

💡 You can make Copilot smarter by setting up custom instructions, customizing its development environment and configuring Model Context Protocol (MCP) servers. Learn more Copilot coding agent tips in the docs.

@vercel
Copy link
Copy Markdown

vercel Bot commented Feb 11, 2026

The latest updates on your projects. Learn more about Vercel for GitHub.

Project Deployment Actions Updated (UTC)
objectui Ready Ready Preview, Comment Feb 11, 2026 2:12am
objectui-console Ready Ready Preview, Comment Feb 11, 2026 2:12am
objectui-storybook Error Error Feb 11, 2026 2:12am

Request Review

… e2e job

The e2e CI job was failing because the webServer command ran
`pnpm --filter @object-ui/console build` which runs tsc directly.
tsc failed (exit code 2) because workspace packages' dist/ directories
didn't exist (the build job runs on a separate VM and artifacts aren't shared).

Changes:
- playwright.config.ts: Use `turbo run build` which properly builds
  dependencies before the console (respects ^build dependency chain)
- ci.yml: Add explicit build step before Playwright tests, so the
  webServer's turbo build is a cache hit (~320ms)

Co-authored-by: hotlong <50353452+hotlong@users.noreply.github.com>
Copilot AI changed the title [WIP] Fix CI e2e test issues fix: use turbo build in e2e CI job to resolve missing package artifacts Feb 11, 2026
Copilot AI requested a review from hotlong February 11, 2026 01:58
@hotlong hotlong marked this pull request as ready for review February 11, 2026 01:59
Copilot AI review requested due to automatic review settings February 11, 2026 01:59
@hotlong hotlong merged commit cafc651 into main Feb 11, 2026
3 of 6 checks passed
Copy link
Copy Markdown
Contributor

Copilot AI left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Pull request overview

Fixes flaky/failing Playwright E2E CI runs by ensuring the console’s production build is generated via Turborepo (so workspace package build outputs exist) rather than relying on a prior CI job’s artifacts.

Changes:

  • Update Playwright webServer.command to run turbo run build for @object-ui/console before starting vite preview.
  • Add an explicit Turbo build step in the CI e2e job before installing browsers/running Playwright.

Reviewed changes

Copilot reviewed 2 out of 2 changed files in this pull request and generated 2 comments.

File Description
playwright.config.ts Switch webServer build to Turborepo to build workspace deps before vite preview.
.github/workflows/ci.yml Add a pre-E2E Turbo build step to ensure build outputs exist in the E2E VM.

Comment thread .github/workflows/ci.yml
Comment on lines +148 to +150
- name: Build packages and console
run: pnpm turbo run build --filter='./packages/*' --filter='./apps/console'

Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This step runs a full Turbo build right before E2E, but Playwright's webServer.command also triggers a Turbo build. Unless you make the Playwright command skip building on CI, this duplicates work and can significantly increase CI duration. Either drop this step and keep the webServer build, or keep this step and adjust the Playwright config to only run preview on CI.

Copilot uses AI. Check for mistakes.
Comment thread playwright.config.ts
*/
webServer: {
command: 'pnpm --filter @object-ui/console build && pnpm --filter @object-ui/console preview --port 4173',
command: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',
Copy link

Copilot AI Feb 11, 2026

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

This webServer.command always runs a Turbo build, but the CI workflow also added an explicit Turbo build step before Playwright. That means CI will build twice (once in the workflow step and again here), increasing job time and potentially pushing against the 180s webServer timeout. Consider making the command conditional (CI: run only preview; local: run turbo build && preview), or remove the explicit build step from the workflow and rely on the webServer build alone.

Suggested change
command: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',
command: process.env.CI
? 'pnpm --filter @object-ui/console preview --port 4173'
: 'pnpm turbo run build --filter=@object-ui/console && pnpm --filter @object-ui/console preview --port 4173',

Copilot uses AI. Check for mistakes.
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants